#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e6+10;
int t,n;
int a[MAXN],c[MAXN];
int main()
{
    freopen("color.in","r",stdin);
    freopen("color.out","w",stdout);
    cin>>t;
    while(cin>>t)
    {
        cin>>n;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        cout<<0<<endl;
    }
    return 0;
}
